home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-03-14 | 2.2 KB | 44 lines | [TEXT/KAHL] |
- Using the ChiselClass…
-
- The ChiselClass was written to provide for subtle "chiseling" (or beveling) effects
- around rectangular objects in a window. They are based on develop, issue 15. There are several
- ways to use create chiseled effects:
-
- • You can set default rectangles and chisel "ways"
- By calling SetDefaultRect, a rectangle is stored in the class, and by calling SetChiselWay
- a default chisel way (in or out) is set. Subsequent calls of "Chisel" or "HairChisel"
- will create a chiseled effect around that default rectangle. Calls to ChiselIn() or
- ChiselOut() and the corresponding HairChisels will also use this default rectangle, but
- the "way" will be temporarily overridden. Similarly, ChiselIn(Rect theRect) et. al. calls
- will use the rectangle and way passed without changing the defaults set
-
- • You can specify a rectangle
- If you specifiy a rectangle with Chisel(Rect theRect), the default "way" is used for the
- chiseling effect, whereas ChiselIn(Rect theRect) et. al. calls will completely override
- any defaults (but won't change them)
-
-
- Other important info:
-
- • Default options are: a 3 pixel chisel border, no black border (used inside the chiseling),
- a dark grey and a lite grey (dirty white) for the dark/lite chiseling effects, and a chiseled-in
- effect
-
- • Getting the rectangle that encloses a chiseled object
- Use ChiselRect() and ChiselRect(Rect theRect) to obtain the rectangle that would enclose
- the default rectangle and the argument rectangle, respectively
-
- • Getting a rectangle to fill a certain chiseled rectangle
- To find out what rectangle you'd have to start with to get chiseled rectangle x, use
- PreChisel(Rect theRect)
-
- • To Erase the rectangle that would be created with a chisel call, use CleanRect() and
- CleanRect(Rect theRect), which will erase the default chisel rect and theRect, respectively
-
- • To change the chisel widths, use SetChiselWidth(short width), where width is the width in pixels
-
- • You can also set the light and dark chisel colors, as well as pass a base color to have
- ChiselClass determine lighter and darker shades (though the latter feature is far from perfect
- right now - if you can improve it, do it and let me know!)
-
- • A few other options are available; check the header file